﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace RxjhServer
{
	public partial class FormUser组队 : Form
	{
		public FormUser组队()
		{
			this.InitializeComponent();
		}

		private void FormUser组队_Load(object sender, EventArgs e)
		{
			foreach (组队Class current in World.W组队.Values)
			{
				string[] array = new string[2];
				try
				{
					array[0] = current.组队id.ToString();
					array[1] = current.组队列表.Count.ToString();
					this.listView1.Items.Insert(this.listView1.Items.Count, new ListViewItem(array));
				}
				catch
				{
				}
			}
		}

		private void listView1_Click(object sender, EventArgs e)
		{
			组队Class 组队Class;
			if (this.listView1.SelectedItems.Count > 0 && World.W组队.TryGetValue(int.Parse(this.listView1.SelectedItems[0].SubItems[0].Text), out 组队Class))
			{
				this.listView2.Items.Clear();
				foreach (Players current in 组队Class.组队列表.Values)
				{
					string[] array = new string[17];
					try
					{
						array[1] = current.人物全服ID.ToString();
						array[2] = current.Userid;
						array[3] = current.UserName;
						array[4] = current.Player_Level.ToString();
						array[5] = current.人物_HP.ToString();
						if (current.Client != null)
						{
							array[6] = current.Client.ToString();
						}
						array[7] = current.人物坐标_地图.ToString();
						array[8] = current.人物坐标_X.ToString();
						array[9] = current.人物坐标_Y.ToString();
						array[10] = current.FLD_人物基本_攻击.ToString();
						array[11] = current.FLD_追加百分比_攻击.ToString();
						array[12] = current.FLD_人物基本_防御.ToString();
						array[13] = current.FLD_追加百分比_防御.ToString();
						array[14] = current.FLD_装备_追加_气功.ToString();
						foreach (组队顺序类 current2 in 组队Class.组队顺序列表.Values)
						{
							if (current2.WorldID == current.人物全服ID)
							{
								array[0] = current2.ID.ToString();
								break;
							}
						}
						array[15] = current.FLD_装备_追加_武器_强化.ToString();
						array[16] = current.FLD_装备_追加_防具_强化.ToString();
					}
					catch
					{
						array[0] = current.人物全服ID.ToString();
						array[1] = current.Userid;
						array[2] = current.UserName;
						array[3] = current.Player_Level.ToString();
					}
					this.listView2.Items.Insert(this.listView2.Items.Count, new ListViewItem(array));
				}
			}
		}
	}
}
